ds=$1

# 执行sqoop同步数据
sqoop import \
--delete-target-dir \
--connect jdbc:mysql://cdh01:3306/city \
--username city \
--password 'City12321133...' \
--query "select * from t_gsj_reg_investor where \$CONDITIONS" \
--target-dir /daas/motl/bigdata03/ods/ods_t_gsj_reg_investor/ds=${ds} \
--fields-terminated-by ',' \
-m 1

# hive增加分区
hive -e "alter table bigdata03_ods.ods_t_gsj_reg_investor add if not exists partition (ds='${ds}');"
